Skip to content

Workflow publishing: contract + backend + webview/VSCode/mobile + CLI + MCP tool (#88)#95

Merged
zo-sol merged 1 commit into
cli-market-parity-93from
feat/workflow-publish-ui
Jul 2, 2026
Merged

Workflow publishing: contract + backend + webview/VSCode/mobile + CLI + MCP tool (#88)#95
zo-sol merged 1 commit into
cli-market-parity-93from
feat/workflow-publish-ui

Conversation

@mega123-art

Copy link
Copy Markdown
Contributor

Summary

Closes #88. You could buy a workflow but not publish one — the on-chain program and the chain-layer publishWorkflow()/publishItemIx already supported it, but no UI surface exposed a kind toggle or a required-skills picker, and publishWorkflow() had no frontmatter-synthesis fallback (unlike publishSkill()), so a clean form couldn't publish a workflow without hand-typed YAML.

  • Contract: publishSkill message gains optional kind?: "skill" | "workflow" + requiredSkills?: string[] (marketMessages.ts, protocol.ts).
  • Backend: env.ts prefers explicit kind/requiredSkills over the existing frontmatter-sniffing fallback (kept for back-compat). workflow.ts's publishWorkflow() now synthesizes frontmatter from separate fields, mirroring publishSkill()'s existing synthesis.
  • Webview (serves VSCode + mobile — mobile's Android WebView loads this same build via surfaces/android/scripts/build-assets.sh): PublishForm.tsx gets a skill/workflow toggle (violet/amber, matching the existing progress-gauge theme) and a required-skills checkbox picker reusing the RegisterWorkRepo pattern.
  • CLI: SkillMarket.tsx publish stage gets a kind toggle field and a comma-separated required-skills field resolved against owned skill mints via ownedSkillMints().
  • MCP tool: publish_skill now routes to publishWorkflow when requiredSkills is non-empty (no separate kind param needed — structured args make it implicit). Not in issue Workflow publishing: program supports it, but no contract/backend/UI path (missing on mobile + VSCode + CLI) #88's stated scope table, included per explicit follow-up decision in this work.

Dependencies / refs for the merger

Test plan

  • pnpm vitest run in packages/core: 225/226 passing (1 pre-existing failure in search_skills returns empty when there are no results, confirmed present on cli-market-parity-93 tip before this branch's changes — unrelated to this PR).
  • Added tests: workflow.spec.ts (plain-body frontmatter synthesis + rejects missing requiredSkills), env.spec.ts (explicit kind/requiredSkills takes precedence over frontmatter-sniffing, both directions), skill-market/index.spec.ts (MCP tool routes to publishWorkflow vs publishSkill).
  • tsc --noEmit clean in packages/core, surfaces/cli, surfaces/webview (pre-existing unrelated unused-var warnings only).
  • Manual devnet smoke test (webview + CLI + MCP tool publish a workflow, gate verified on buy) — not yet run, no devnet script exists in-repo to automate it.

🤖 Generated with Claude Code

#88)

Wires a kind toggle + required-skills picker through the shared
publishSkill message, the host routing in env.ts, and every UI surface.
The chain layer (publishWorkflow, publishItemIx) already existed; the
gap was purely contract + UI. Also fixes publishWorkflow() to
synthesize frontmatter from separate fields (mirroring publishSkill),
so a clean form needs no hand-typed YAML, and extends the agent-facing
publish_skill MCP tool to route to publishWorkflow when requiredSkills
is non-empty.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants